package cn.jeeweb.web.modules.equipment.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.jeeweb.common.annotate.UiPropertyField;
import cn.jeeweb.common.flag.ObjectMark;
import cn.jeeweb.common.mvc.entity.DataEntity;
import cn.xjzn.framework_Core.ControlType;
import cn.xjzn.framework_Core.ModuleServe;
import cn.xjzn.framework_Core.StaticControl;
import com.baomidou.mybatisplus.annotations.TableField;

import java.util.Date;

/**
 * Created by zll on 2019/11/12.
 */
public class EqsMaintenanceTask extends DataEntity<String> implements ObjectMark {

    @TableField(value = "code")
    @Excel(name = "编码", orderNum = "1", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "code",codeConfig = "MTKAUTOCODE",labelText="编码",displayPosition = 1)
    private String code;
    @TableField(value = "name")
    @Excel(name = "任务名称", orderNum = "2", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "name",labelText="名称",displayPosition = 2)
    private String name;
    @TableField(value = "planId")
    @Excel(name = "保养计划ID", orderNum = "3", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "id",aliasName = "planId",labelText="计划id",isReference = 1,referenceModuleId=ModuleServe.eqsMaintenancePlanModule,ownerPropertyName = "eqsMaintenancePlan",displayPosition = 3)
    private String planId;

    @TableField(value = "equipmentId")
    @Excel(name = "设备ID", orderNum = "4", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "id",aliasName = "equipmentId",labelText="设备id",isReference = 1,referenceModuleId=ModuleServe.equipmentModule,ownerPropertyName = "eqsEquipment",canBeNull=false,displayPosition = 3)
    private String equipmentId;

    @TableField(value = "maintenance_type")
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "maintenanceType",labelText="保养类别",displayPosition = 4)
    private String maintenanceType;
    @TableField(value = "taskDate")
    @Excel(name = "任务计划执行日期", orderNum = "5", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "taskDate",labelText="任务计划执行日期",displayPosition = 5,staticControl = StaticControl.DATESTATICCONTROL,canBeNull=false)
    private Date taskDate;
    @TableField(value = "status")
    @Excel(name = "任务状态", orderNum = "6", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "status",labelText="任务状态",displayPosition = 6,dictCode = "orderStatus",controlType = ControlType.DICTSELECTCONTROL)
    private String status;
    @TableField(value = "executionTime")
    @Excel(name = "任务实际完成时间", orderNum = "7", width = 20.0D)
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "executionTime",labelText="任务执行时间",displayPosition = 7,staticControl = StaticControl.DATESTATICCONTROL)
    private Date executionTime;
    @TableField(value = "executor")
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "executor",labelText="任务执行人",displayPosition = 8)
    private String executor;

    @TableField(value = "executorId")
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "executorId",labelText="任务执行人id",displayPosition = 9,canDisplay=false,isDisplayAsSearchResult=false)
    private String executorId;

    @TableField(value = "groupId")
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "groupId",labelText="分组id",displayPosition = 9)
    private String groupId;

    @TableField(value = "groupUserIds")
    @UiPropertyField(moduleId = ModuleServe.eqsMaintenanceTaskModule,propertyName = "groupId",labelText="分组下属用户ids",displayPosition = 9)
    private String groupUserIds;

    @TableField(exist = false)
    private EqsMaintenancePlan eqsMaintenancePlan;

    @TableField(exist = false)
    private EqsMaintenanceCheck eqsMaintenanceCheck;

    @TableField(exist = false)
    private String[] groupUserArray;

    @TableField(exist = false)
    private String[] ids;

    public EqsMaintenancePlan getEqsMaintenancePlan() {
        return eqsMaintenancePlan;
    }

    public void setEqsMaintenancePlan(EqsMaintenancePlan eqsMaintenancePlan) {
        this.eqsMaintenancePlan = eqsMaintenancePlan;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getExecutionTime() {
        return executionTime;
    }

    public void setExecutionTime(Date executionTime) {
        this.executionTime = executionTime;
    }

    public String getPlanId() {
        return planId;
    }

    public void setPlanId(String planId) {
        this.planId = planId;
    }

    public String getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(String equipmentId) {
        this.equipmentId = equipmentId;
    }

    public String getMaintenanceType() {
        return maintenanceType;
    }

    public void setMaintenanceType(String maintenanceType) {
        this.maintenanceType = maintenanceType;
    }

    public Date getTaskDate() {
        return taskDate;
    }

    public void setTaskDate(Date taskDate) {
        this.taskDate = taskDate;
    }

    public String getExecutor() {
        return executor;
    }

    public void setExecutor(String executor) {
        this.executor = executor;
    }

    public String getExecutorId() {
        return executorId;
    }

    public void setExecutorId(String executorId) {
        this.executorId = executorId;
    }

    public String[] getIds() {
        return ids;
    }

    public void setIds(String[] ids) {
        this.ids = ids;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupUserIds() {
        return groupUserIds;
    }

    public void setGroupUserIds(String groupUserIds) {
        this.groupUserIds = groupUserIds;
    }


    public String[] getGroupUserArray() {
        return groupUserArray;
    }

    public void setGroupUserArray(String[] groupUserArray) {
        this.groupUserArray = groupUserArray;
    }
}
